<template>
  <div>
    <title-header :title="title"></title-header>
    <adds></adds>
    <router-link :to="{name:'newaddress', query : {title:'新增收货地址'}}" @click.native='newAdd'>
      <x-button type="warn" action-type="reset" class="btn-place">新增收货地址</x-button>
    </router-link>
  </div>

</template>
<script>
import { XButton } from 'vux'
import TitleHeader from '@/components/titleHeader.vue'
import Adds from '@/components/adds.vue'
export default {
  components: {
    Adds,
    XButton,
    TitleHeader
  },
  data () {
    return {
      title: '收货地址'
    }
  },
  methods: {
    newAdd () {
      this.$store.commit('clearEditorAddressObj')
    }
  }
}
</script>

<style scoped>
.btn-place {
  position: fixed;
  bottom: 0;
  border-radius: 0;
}
</style>